import { http } from "@/utils/http";
import type { ResultProps } from "@/api/user";

export const deviceCleanStepGetList = (data?: object) => {
  return http.request<ResultProps<any[]>>("post", "/deviceCleanStep/getList", {
    data
  });
};

export const deviceCleanStepAdd = (data?: object) => {
  return http.request<ResultProps<any[]>>("post", "/deviceCleanStep/add", {
    data
  });
};

export const deviceCleanStepUpd = (data?: object) => {
  return http.request<ResultProps<any[]>>("post", "/deviceCleanStep/upd", {
    data
  });
};

export const deviceCleanStepDel = (data?: object) => {
  return http.request<ResultProps<any[]>>("post", "/deviceCleanStep/del", {
    data
  });
};

export const getBoardVersions = (data?: object) => {
  return http.requestJson<ResultProps<any[]>>(
    "post",
    "device/getBoardVersions",
    {
      data
    }
  );
};

export const getListModelByComponent = (params?: object) => {
  return http.request<ResultProps<any[]>>(
    "get",
    "/deviceComponent/getListModelByComponent?",
    {
      params
    }
  );
};
